<?php
/**
 * Created by PhpStorm.
 * User: Dinh Thi
 * Date: 2/8/15
 * Time: 10:21 PM
 */

namespace MyApp\Application\Controller;

use DinhThi\MVC\AbstractController;
use Zend\Authentication\AuthenticationService;

class MyAppAbstractController extends AbstractController{
    public function __construct(){
        parent::__construct();
    }

    public function mustBeLogin(){
        $user = new AuthenticationService();
        if (!$user->hasIdentity()){
            $this->redirect('user', 'login');
        }
    }

} 